package ac.manchester.cs.afzal.autoservd.pattern_extraction;

import ac.manchester.cs.afzal.autoservd.interactions.Interactions;
import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main
{

    public static void main(String[] args)
    {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String input;
        try
        {
            System.out.println(
                    "*****************************************************");
            System.out.print(
                    "Please Choose among following options:\n" +
                    " 1. Retrieve dependency statements for all SC_Instances and write in a text file \n" +
                    " 2. Fill the Predicates table \n" +
                    " 3. Load PASs for Dep-only and Hybrid Parse \n" +
                    " 4. Load PASs for Corpus Predicate using Phrase-Structure parse \n" +
                    " 5. Load PASs for General Verbs using Phrase-Structure parse \n" +
                    " 6. Load Interactions for Classes with Classes \n" +
                    " 7. Load Interactions for Classes with Other Terms \n" +
                    " 8. Load Interactions for Classes with MyGrid Terms \n" +
                    " 9. Load Interactions for Classes with Descriptors \n" +
                    " 10. Load Interactions for Classes with Descriptors (Matching within Argument) \n" +
                    " 11. Load Interactions for Classes with MyGrid (Matching within Argument) \n" +
                    " Enter number to continue or 'e' to exit : ");
            input = in.readLine();
            input = input.trim();

            if (input.equals("1"))
            {
                Process_Dependency_Parse pdp = new Process_Dependency_Parse();
                pdp.dep_statement_extract();
            }
            else if (input.equals("2"))
            {
                Process_Dependency_Parse pdp = new Process_Dependency_Parse();
                pdp.fill_the_predicates_table();
            }
            else if (input.equals("3"))
            {
                Process_Predicate_Argument_Structures ppas = new Process_Predicate_Argument_Structures();
                ppas.load_both_arguments_from_predicates_using_dep_hybrid();
            }
            else if (input.equals("4"))
            {
                Process_Predicate_Argument_Structures ppas = new Process_Predicate_Argument_Structures();
                ppas.load_both_arguments_from_predicates_using_phrase();
            }
            else if (input.equals("5"))
            {
                Process_Predicate_Argument_Structures ppas = new Process_Predicate_Argument_Structures();
                ppas.load_both_arguments_for_general_verbs_using_phrase();
            }
            else if (input.equals("6"))
            {
                Interactions interactions = new Interactions();
                interactions.class_overlap();
            }
            else if (input.equals("7"))
            {
                Interactions interactions = new Interactions();
                interactions.class_overlap_terms();
            }
            else if (input.equals("8"))
            {
                Interactions interactions = new Interactions();
                interactions.class_overlap_mygrid();
            }
            else if (input.equals("9"))
            {
                Interactions interactions = new Interactions();
                interactions.class_overlap();
            }
            else if (input.equals("10"))
            {
                Interactions interactions = new Interactions();
//                interactions.argumet_overlap_descriptors("database");
            }
            else if (input.equals("e"))
            {
                System.exit(0);
            }
        }
        catch (Exception ex)
        {
            System.out.println("SQL Exception: Main Menu : " + ex.getMessage());
        }

    }
}
